var actualizarProducto = function ()
{
	var form 				= $("#products-update-form");
	var name 				= $("#products-update-form-name");
	var description			= $("#products-update-form-description");
	var shortdescription	= $("#products-update-form-short-description");
	var imageURL			= $("#products-update-form-image-url");
	var type				= $("#products-update-form-section");
	
	if(!name.val()){
		alert("Necesitas ingresar el nombre");
		name.focus();
		return
	}
	
	form.submit();

}

var borrarProducto = function ()
{
	var borrar 	= $("#products-update-delete-form");
	var form 	= $("#products-update-form");
	
	if(confirm("¿Esta seguro que desea eliminar este producto?"))
	{
		borrar.val(1);	
		form.submit();
	}
	
}

$(document).ready(function ()
{
	var name = $("#products-update-form-name");
		name.focus();
		
});